/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pa165.dominating.species.tos;

import java.io.Serializable;
import pa165.dominating.species.enums.ElementType;

/**
 *
 * @author Ondrej Prazak
 */
public class ElementTo implements Serializable {

    private static final long serialVersionUID = 89L;
    private Long id;
    private String description;
    private ElementType type;
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public ElementType getType() {
        return type;
    }

    public void setType(ElementType type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ElementTo ele = (ElementTo) obj;
        if (this.getId() != ele.getId() && (this.getId() == null || !this.getId().equals(ele.getId()))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        return 7 * this.getType().hashCode() + 13 * this.getDescription().hashCode() + getId().hashCode() * 23;
    }

    @Override
    public String toString() {
        return "Element{" + "id=" + id + ", description=" + description + ", type=" + type + '}';
    }
}
